#ifndef __MYSTDIO_H__
#define __MYSTDIO_H__

#include<string.h>
  
#include<unistd.h>

#define BUFF_SIZE 1024
#define FLUSH_NONE 1
#define FLUSH_LINE 2
#define FLUSH_ALL 4

typedef struct IO_FILE
{
    int fileno;
    int flag;  //刷新策略
    int out_pos;
    char outbuffer[BUFF_SIZE];
}_FILE;

_FILE* _fopen(const char* filename,const char* flag);
int _fwrite(_FILE* fp,const char* s,int len);
void _fclose(_FILE* fp);


#endif

